Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InstancePre can impl Clone #3510

Merged
merged 1 commit into from
Nov 8, 2021
Merged

InstancePre can impl Clone #3510

merged 1 commit into from
Nov 8, 2021

Conversation

pchickey
Copy link
Contributor

@pchickey pchickey commented Nov 6, 2021

Its a manually written impl, not a derive, because InstancePre<T>: Clone
is not bound by T: Clone.

The clone should be reasonably inexpensive: Clone for Module is just an
Arc, and Clone for Definition should also just be an Arc on the HostFunc
or Instance variants. An InstancePre shouldnt contain any
Definition::Extern variants because there is not yet a Store associated
with it- right?

Its a manually written impl, not a derive, because InstancePre<T>: Clone
does not require T: Clone.

The clone should be reasonably inexpensive: Clone for Module is just an
Arc, and Clone for Definition should also just be an Arc on the HostFunc
or Instance variants. An InstancePre shouldnt contain any
Definition::Extern variants because there is not yet a Store associated
with it- right?
@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Nov 6, 2021
@github-actions
Copy link

github-actions bot commented Nov 6, 2021

Subscribe to Label Action

cc @peterhuene

This issue or pull request has been labeled: "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • peterhuene: wasmtime:api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton alexcrichton merged commit 2053e97 into main Nov 8, 2021
@alexcrichton alexcrichton deleted the pch/instance_pre_clone branch November 8, 2021 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:api Related to the API of the `wasmtime` crate itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants